#ifndef __OPTION_TOOLS_H__
#define __OPTION_TOOLS_H__

#include "IOptionsControl.h"


class COptionTools : public virtual IOptionTools
{
INIT_CLASS_SINGLETON(COptionTools)
public:
	const bool Init(const void * pvdPara, char * pszMsgTxt, int iMsgTxtSize);
	bool CalculateFlg(const char * pszLbm, IValueSet * ptrValList, IPacket ** ptrPktJson);
	void VarFromJson(const char * pszLbm, IValueSet * ptrValList, void * ptrRecInfo, IPacket * ptrPktJson, void * ptrFieldNameList, void * ptrResult, const char * pszKey);
	void AddResultItem(void * ptrResult, const char * pszLbm, const char * pszKey, const char * pszFlg, const char * pszName, const char * pszValue);
	void PushTask(bool bCondition, void * ptrResult);	
	IStkTrdCtrl & StkTrdCtrl();
	IContractColumnTitle & ContractColumnTitle();
	ISubjectGui & SubjectGui();
	IClientCheckRisk & ClientCheckRisk();
	ICalculateContractQuotation & CalculateContractQuotation();
private:
	shared_ptr<IStkTrdCtrl> m_ptrStkTrdCtrl;
	shared_ptr<IContractColumnTitle> m_ptrContractColumnTitle;
	shared_ptr<ISubjectGui> m_ptrSubjectGui;
	shared_ptr<IClientCheckRisk> m_ptrClientCheckRisk;
	shared_ptr<ICalculateContractQuotation> m_ptrCalculateContractQuotation;
};




#endif//__OPTION_TOOLS_H__
